// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 获取 权限树 POST */
export async function treePermission(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AdminPermissionData.Permission[]>>(
    '/admin/permission/tree',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 保存 权限 POST */
export async function savePermission(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AdminPermissionData.Permission>>('/admin/permission/save', {
    method: 'POST',
    data: options || {},
  });
}

/** 编辑 权限 POST */
export async function updatePermission(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AdminPermissionData.Permission>>('/admin/permission/update', {
    method: 'POST',
    data: options || {},
  });
}

/** 删除 权限 POST */
export async function deletePermission(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<null>>('/admin/permission/delete', {
    method: 'POST',
    data: options || {},
  });
}


